// 基于template/src/views/{{appModules}}/{{pages@DEWIZARDVIEW}}/{{spinalCase page.codeName}}-hook.ts.hbs生成
import { QXEvent } from 'qx-util';
import {
	WizardViewActionType,
	WizardViewController,
	IWizardViewAbility,
	IWizardViewControllerParams,
	IParam,
	IViewEvent,
} from '@/core';
import {
	useWizardViewProps,
	useWizardViewBasic,
	useWizardViewControllerParams,
    useWizardViewAction,
} from '@/hooks/view/use-wizard-view';
import { model } from "./ibizbook-wizard-view-model";

/**
 * 获取输入参数
 *
 * @export
 * @return {*}
 */
export function useProps() {
	return {
		...useWizardViewProps()
	};
}

/**
 * 获取基础数据
 *
 * @export
 * @param {*} props
 * @return {*}
 */
export function useBasic(props: any) {
	return {
		...useWizardViewBasic(model, props)
	};
}

/**
 * 获取行为
 *
 * @export
 */
export function useAction(controller: any) {
	return {
        ...useWizardViewAction(controller)
    }
}

/**
 * 获取控制器
 *
 * @export
 * @param {IParam} props
 * @param {QXEvent<IViewEvent<WizardViewActionType, IWizardViewAbility>>} evt
 * @return {*}
 */
export function useController(
	props: IParam,
	evt: QXEvent<IViewEvent<WizardViewActionType, IWizardViewAbility>>
) {
	const params: IWizardViewControllerParams<
		WizardViewActionType,
		IWizardViewAbility
	> = useWizardViewControllerParams(model, props, evt);
	return new WizardViewController(params);
}